<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模块化</title>
</head>
<body>

<script type="module">
    //1.通用的导入方式
    //引入模块m1
    import * as m1 from "./m1.js"
    console.log(m1);

    //引入模块m2
    import * as m2 from "./m2.js";
    console.log(m2);
    m2.findJob();

    //引入模块m3
    import * as m3 from "./m3.js";

    console.log(m3);
    m3.default.change();

    //2.解构赋值的方式
    import {school,teach} from "./m1.js";
    console.log(school);
    console.log(teach);

    import {default as m3_} from "./m3.js";

    console.log(m3_)

    //3.简便形式，只能针对默认暴露
    import m3__ from "./m3.js";

    console.log(m3__);


</script>

<script type="module" src="app.js"></script>
</body>
</html>